let arr = []
function Insert(num)
{
    // write code here
    arr.push(num)
}
function GetMedian(){
	// write code here
  arr.sort((a,b)=>a-b) // 升序排列
  let mid = Math.floor((arr.length-1)/2) // 获取中间的值
  if(arr.length % 2 === 0){
    return (arr[mid] + arr[mid+1])/2
  }else{
    return arr[mid]
  }
}
module.exports = {
    Insert : Insert,
    GetMedian : GetMedian
};